package com.ly.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
public class Menu implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer id;
    @ApiModelProperty(value = "跳转路径,为空时代表是一个父菜单")
    private String path;
    @ApiModelProperty(value = "路由名称")
    private String name;
    @ApiModelProperty(value = "VUE文件所在的位置")
    private String filePath;
    @ApiModelProperty(value = "0需要令牌认证，1不需要令牌认证")
    private Integer isToken;
    @ApiModelProperty(value = "菜单名称")
    @NotBlank(message = "菜单名称不能为空")
    private String menuName;
    @ApiModelProperty(value = "0 显示在左侧菜单 1不显示")
    @NotNull(message = "请告知是否显示在左侧菜单")
    private Integer isShowMenu;
    @ApiModelProperty(value = "排序字段")
    @NotNull(message = "请设置排序数字")
    private Integer sort;
    @ApiModelProperty(value = "父菜单ID")
    private Integer parentId;
    @ApiModelProperty(value = "菜单图标")
    private String icon;
    private List<Menu> children;
    private List<Integer> menuIds;
}
